package com.pro.service.imple;

import com.pro.mapper.UserMapper;
import com.pro.pojo.User;
import com.pro.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImple implements UserService{
    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUser(String account, String password) {
        return userMapper.getUser(account,password);
    }

    @Override
    public User getUserName(String username) {
        return userMapper.getUserName(username);
    }

    @Override
    public User selectUserById(Integer id) {
        return userMapper.selectUserById(id);
    }

    @Override
    public boolean updateUser(User user) {
        return userMapper.updateUser(user);
    }

    @Override
    public boolean uploadUserHead(User user) {
        return userMapper.uploadUserHead(user);
    }

    @Override
    public List<User> getUsersByAccountNameDeptNameRegisterDate(User user) {
        return userMapper.getUsersByAccountNameDeptNameRegisterDate(user);
    }

    @Override
    public boolean updateUserEnable(User user) {
        return userMapper.updateUserEnable(user);
    }

    @Override
    public boolean updateUserStatus(User user) {
        return userMapper.updateUserStatus(user);
    }

    @Override
    public List<User> getUsersByDeptId(Integer deptId) {
        return userMapper.getUsersByDeptId(deptId);
    }

    @Override
    public boolean updateUserMessage(User user) {
        return userMapper.updateUserMessage(user);
    }

    @Override
    public List<User> getUsersByEmailPhoneIdCardStatusSexEnabled(User user) {
        return userMapper.getUsersByEmailPhoneIdCardStatusSexEnabled(user);
    }

    @Override
    public boolean addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public boolean addUsers(List<User> user) {
        return userMapper.addUsers(user);
    }

    @Override
    public User getUserById(Integer userId) {
        return userMapper.getUserById(userId);
    }
}
